import * as Apis from "../../apis/Api";
import { observable, action } from 'mobx';

class DynamicStore {
    @observable list = [];
    
    @action
    init=(id=-1)=>{
        const params = {contractId:id};
        Apis.getDynamic(params).then(data => {
            this.list = data.datas;
        });
        
    }

    @action 
    componentWillUnmount = ()=>{
        this.list = [];
    }
}

export default DynamicStore;